<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>8</title>
</head>
<body>
<script>
    //输出1到1000之间既能被5整除又能被3整除的数，并且每行输出4个，并打印输出满足条件的数的个数
    var count=0;
    var sum=0;
    var str="";
    for (let i = 1; i < 1000; i++) {
        if (i%5==0&&i%3==0){
            str+=i+" ";
            count++;
            sum++;
            if (sum%4==0){
                str+="\n";
            }
        }
    }
    console.log(str);
    console.log("满足条件的个数为:"+count);
</script>
</body>
</html>